package kr.go.nih.biomedi.pSEVA.bean;

public class Samtools {

	private String realFolder;
	private String inputFile;
	private String FieldSeparator=",";

	public String getRealFolder() {
		return realFolder;
	}

	public void setRealFolder(String realFolder) {
		this.realFolder = realFolder;
	}

	public String getInputFile() {
		return inputFile;
	}

	public void setInputFile(String inputFile) {
		this.inputFile = inputFile;
	}

	public String doSamtoolsBAMExecute() {
		String strCmd = "/bin/sh" + FieldSeparator + "-c" + FieldSeparator + "/ldata/home/tslinux/Programs/samtools-0.1.12a/samtools view -bS -o " + 
						this.getRealFolder() + "/" + this.getInputFile() + ".bam " + this.getRealFolder() + "/" + this.getInputFile() + ".sam";
		return strCmd;
	}	

	public String doSamtoolsSortExecute() {
		String strCmd = "/bin/sh" + FieldSeparator + "-c" + FieldSeparator + "/ldata/home/tslinux/Programs/samtools-0.1.12a/samtools sort " + 
						this.getRealFolder() + "/" + this.getInputFile() + ".bam " + this.getRealFolder() + "/" + this.getInputFile() + ".sorted";
		return strCmd;
	}	

	public String doSamtoolsPileupExecute() {
		String strCmd = "/bin/sh" + FieldSeparator + "-c" + FieldSeparator + "/ldata/home/tslinux/Programs/samtools-0.1.12a/samtools pileup -f /ldata/home/tslinux/Genomes/Human/bwa_hg19/chr_all.fa -cv " 
			  + this.getRealFolder() + "/" + this.getInputFile() + ".sorted.bam > "
			  + this.getRealFolder() + "/" + this.getInputFile() + ".sorted.bam.pileup";
		return strCmd;
	}	

	public String doSamtoolsSNPcallExecute() {
		String strCmd = "/bin/sh" + FieldSeparator + "-c" + FieldSeparator + "/usr/bin/perl " + "/ldata/home/tslinux/Programs/samtools-0.1.12a/misc/samtools.pl varFilter " 
			  + this.getRealFolder() + "/" + this.getInputFile() + ".sorted.bam.pileup > "
			  + this.getRealFolder() + "/" + this.getInputFile() + ".sorted.bam.pileup.snp";
		return strCmd;
	}	
	
}
